﻿
namespace TemperatureWP.Model
{
    public class TemperatureModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Place { get; set; }
        public double CurrentTemperature { get; set; }
        public double TargetTemperature { get; set; }
        public bool Active { get; set; }

        // Solution regarding problem with listpicker
        // Source : http://stackoverflow.com/questions/8493167/listpicker-and-selecteditem-must-always-be-set-to-a-valid-value
        public override bool Equals(object obj)
        {
            var other = obj as TemperatureModel;
            return other != null && Id == other.Id;
        }
    }
}
